package de.gameduell.framework.modules.event
{
	import de.gameduell.framework.debug.Debug;
	import de.gameduell.net.src.communication.ServerMessageEvent;
	
	/**
	 * player_left [player id] [continueGame] [aborterCount]
	 **/
	public class PlayerLeftEvent extends NetworkEvent 
	{
		public static const PLAYER_LEFT:String = "playerLeft";

		public var playerId:int;
		public var continueGame:Boolean;
		public var aborterCount:int;
		
		public function PlayerLeftEvent(event:ServerMessageEvent) {
			super(PLAYER_LEFT);
			
			playerId = int(event.parameters[0]);
			continueGame = (event.parameters[1] == "1");
			aborterCount = int(event.parameters[2]);
			
			Debug.trace("PlayerLeftEvent() playerId:" + playerId + " continueGame:" + continueGame + " aborterCount:" + aborterCount);
		}

	}
		 
	
}